package com.xiaozhen.driver.controller;

import com.xiaozhen.common.core.domain.AjaxResult;
import com.xiaozhen.common.core.domain.driver.ParseTcpAttributeFormula;
import com.xiaozhen.driver.service.ParseTcpAttributeFormulaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/9/29 14:53
 * @description:
 */
@RestController
@Api(tags = "给属性配置计算的接口")
@RequestMapping("/parseAttributeFormula")
public class ParseTcpAttributeFormulaController {

    @Autowired
    private ParseTcpAttributeFormulaService parseAttributeFormulaService;

    @ApiOperation("获取驱动列表")
    @GetMapping("/list")
    public AjaxResult list(@RequestParam("attributeId")Long attributeId) {
        List<ParseTcpAttributeFormula> formulaList = parseAttributeFormulaService.selectFormulaList(attributeId);
        return AjaxResult.success(formulaList);
    }

}
